package com.sipgate.siplistener;

import com.dimld.api.ApiHttpMsg;
import com.dimld.api.ApiTcpMsg;
import com.dimld.api.ApiWebSocketMsg;
import com.dimld.connect.server.HttpServer;
import com.dimld.connect.server.TcpServer;
import com.dimld.utils.LogbackUtil;
import com.dimld.utils.Tools;

public class App {

    public static void main(String[] args) {
        try {

            new Thread(new TcpServer(13000, ApiTcpMsg.class, 30, Thread.currentThread().getName())).start();
            new Thread(new HttpServer(13001, ApiHttpMsg.class, null, 30, Thread.currentThread().getName())).start();
            new Thread(new HttpServer(13002, null, ApiWebSocketMsg.class, 30, Thread.currentThread().getName())).start();

            SipgateSipListener listener = new SipgateSipListener();
            listener.init();
//            listener.register();
            listener.invite();
        } catch(Exception e) {
            e.printStackTrace();
        }
    }

}
